import yaml
from po.loginPage import login_page
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
def load_yaml(path):
    with open(path) as f:
        #safe_load 方法返回的是一个字典,类似于下面这种
        """
        {'app': 
            {'name': 'My Awesome App', 
            'version': '1.5.0',
            'debug': False, 
            'database': {'driver': 'postgresql', 'host': 'db.example.com'}
            }
        }    
        """
        return yaml.safe_load(f)

config_dict = load_yaml(r'config/config.yaml')
print(config_dict)

driver = webdriver.Chrome(service=Service(r'/Users/show/Downloads/编程/python学习/chromedriver-mac-arm64/chromedriver'))
l = login_page(driver)
l.login('byhy','sdfsdf')